package com.cg.design.graphicdesignpattern.proxy;

import org.junit.Test;

/**
 * Proxy代理模式测试类
 *
 * @program: LeetCode->ProxyTest
 * @description: Proxy代理模式测试类
 * @author: cg
 * @create: 2022-04-04 09:05
 **/
public class ProxyTest {

    @Test
    public void testProxy() {
        Printable proxy = new PrinterProxy("chenyumeng", "Printer");
        System.out.println("现在的名字是：" + proxy.getPrinterName() + "。");
        proxy.setPrinterName("tianyuliufang");
        System.out.println("现在的名字是：" + proxy.getPrinterName() + "。");
        proxy.print("Hello.p");
    }
}
